From 225cf268e9ab80ab66f859ce2cdbbac9de1b4d8d Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 6 Apr 2006 01:55:30 +0000 Subject: [PATCH] Warn for unknown options passed to filters, too. --- filter_vecs.c | 7 ++++++- vecs.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/filter_vecs.c b/filter_vecs.c index 6924d9085..51dd19244 100644 --- a/filter_vecs.c +++ b/filter_vecs.c @@ -1,7 +1,7 @@ /* Describe vectors containing filter operations. - Copyright (C) 2002,2004,2005 Robert Lipe, robertlipe@usa.net + Copyright (C) 2002,2004,2005,2006 Robert Lipe, robertlipe@usa.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,6 +123,7 @@ find_filter_vec(char *const vecname, char **opts) fl_vecs_t *vec = filter_vec_list; char *v = xstrdup(vecname); char *svecname = strtok(v, ","); + int found = 0; while (vec->vec) { arglist_t *ap; @@ -156,12 +157,16 @@ find_filter_vec(char *const vecname, char **opts) opt = get_option(*opts, ap->argstring); if ( opt ) { + found = 1; assign_option(vec->name, ap, opt); xfree(opt); } } } } + if (opts && opts[0] && !found) { + warning("'%s' is an unknown option to %s.\n", *opts, vec->name); + } if (global_opts.debug_level >= 1) disp_vec_options(vec->name, vec->vec->args); diff --git a/vecs.c b/vecs.c index b0e3d26aa..207679709 100644 --- a/vecs.c +++ b/vecs.c @@ -1,7 +1,7 @@ /* Describe vectors containing file operations. - Copyright (C) 2002, 2004, 2005 Robert Lipe, robertlipe@usa.net + Copyright (C) 2002, 2004, 2005, 2006 Robert Lipe, robertlipe@usa.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- 2.30.2